function result = intprocess(mat,t,T)

n=size(mat,2);
dt=(T-t)/(n-1);
result=(sum(mat,2)-mat(:,1)/2-mat(:,n)/2)*dt;


